package com.itheima.service.impl;

import com.itheima.dao.IUserDao;

import com.itheima.domain.User;
import com.itheima.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mr.Shen
 * @date 2020-02-13 19:20
 */
@Service
public class IUserServiceImpl implements IUserService {
    @Autowired
    IUserDao UserDao;
    @Override
    public List<User> findAll() {
        return UserDao.findAll();
    }

    @Override
    public User findById(Integer id) {
        return UserDao.findById( id);
    }

    @Override
    public void updateUser(User user) {
        UserDao.updateUser(user);
    }
}
